#include "Input.h"
#include "Graphic.h"
#include "../System/Configuration.h"
#include "../Menu/Menu.h"
#include "../Menu/Logic.h"

int Input_ScrollSpeed;

void Input_Init()
{
    /* Scroll geschwindichkeit */
    Input_ScrollSpeed = Configuration_GetIni("input:scrollspeed", 50);
}

void Input_Reset() {
    Input.Mouse_1 = 0;
    Input.Mouse_2 = 0;
    Input.Mouse_3 = 0;
    Input.Up      = 0;
    Input.Down    = 0;
    Input.Right   = 0;
    Input.Left    = 0;
}

void Input_Process()
{
    int X,Y;

    /* Camera Achsen */
    X = Graphic_GetCamera(0);
    Y = Graphic_GetCamera(1);

    /*Graphic_LoadTile(Input_Tile);
    Graphic_Draw( (X+Input.X)/32*32, (Y+Input.Y)/32*32, 0, 2, false );*/

    if(Input.Mouse_1)
        Logic_Build( Input.X+X, Input.Y+Y, 1);

    if(Input.Left) {
    }

    if(Input.Right) {
    }

    if(Input.Mouse_3) {
        //Graphic_Camera(Input.X/Graphic_Zoom, Input.Y*Graphic_Zoom);
    }

    /** Reset */
    Input_Reset();
}
